package com.ruoyi.shouye.mapper;

import com.ruoyi.gouhuoruku.domain.GouhuoRuku;
import com.ruoyi.qianhuankuan.domain.Qianhuankuan;
import com.ruoyi.shouye.domain.GoodNameDto;
import com.ruoyi.shouye.domain.CangkuKucunVo;
import com.ruoyi.shouye.domain.XiaoshouDto;
import com.ruoyi.shouye.domain.XiaoshouVo;
import com.ruoyi.xiaoshouchuku.domain.XiaoshouChuku;
import com.ruoyi.yuangong.domain.Yuangong;
import com.ruoyi.zongdianpifa.domain.ZongdianPifa;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Mapper
@Repository
public interface ShouyeMapper {

    /**
     * 总店批发表当日销售金额统计
     * @param xiaoshouDto
     * @return
     */
    List<ZongdianPifa> selectZongdianPifaList(XiaoshouDto xiaoshouDto);

    /**
     * 销售出库表当日销售金额统计
     * @param xiaoshouDto
     * @return
     */
    List<XiaoshouChuku> selectXiaoshouChukuByDate(XiaoshouDto xiaoshouDto);
    List<XiaoshouChuku> selectXiaoshouChukuByDate2(XiaoshouDto xiaoshouDto);


    /**
     * 欠还款表当日未还款金额统计
     * @param xiaoshouDto
     * @return
     */
    List<Qianhuankuan> selectQianhuankuanList(XiaoshouDto xiaoshouDto);

    /**
     * 当日购货金额
     * @param xiaoshouDto
     * @return
     */
    List<GouhuoRuku> selectGouhuoList(XiaoshouDto xiaoshouDto);

    /**
     * 根据仓库查询库存表的各商品的库存总数
     * @return
     */
    List<GoodNameDto> goodNameSum(String cangku);

    /**
     * 查询出仓库和仓库商品总数
     * @return
     */
    List<CangkuKucunVo> cangkuAndkucun();

    /**
     * 查询销售出库表排行前十的总销售金额和总数量的商品
     * @return
     */
    List<XiaoshouVo> selectXiaoshouChukupaihangByShuliang(@Param("chukuCangku") String chukuCangku, @Param("beginTime") Date beginTime, @Param("endTime") Date endTime);

    List<Yuangong> selectTodayYuangongList(@Param("chukuCangku") String chukuCangku, @Param("beginTime") Date beginTime, @Param("endTime") Date endTime);

    List<XiaoshouVo> selectXiaoshouChukupaihangByShuliang( @Param("beginTime") Date beginTime, @Param("endTime") Date endTime);

}
